﻿using My.Core.Model.Models;
using My.Core.Model.ViewModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace My.Core.Model.ViewModel
{

    /// <summary>
    /// 编辑菜单
    /// </summary>
    public class EditFrameworkMenView
    {

        /// <summary>
        /// 菜单Id
        /// </summary>
        [Display(Name = "Id", Description = "")]
        public int Id { get; set; }


        /// <summary>
        /// 父ID
        /// </summary>
        [Display(Name = "父ID", Description = "")]
        public int? ParentId { get; set; }
        /// <summary>
        /// 页面名称
        /// </summary>
        [Display(Name = "页面名称", Description = "")]

        public string PageName { get; set; }

        /// 控制器名称
        /// </summary>
        [Display(Name = "控制器名称")]
      
        public string ControllerName { get; set; }

        /// <summary>
        /// 控制器
        /// </summary>
        [Display(Name = "控制器")]
        public string Controller { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        [Display(Name = "图标")]

        public string Icon { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Display(Name = "排序")]

        public int OrderSort { get; set; }
        /// <summary>
        /// /描述
        /// </summary>
        [Display(Name = "描述")]
        public string Description { get; set; }

        /// <summary>
        /// 是否是右侧菜单
        /// </summary>
        [Display(Name = "是否是右侧菜单")]
        public bool IsMenu { get; set; }


        /// <summary>
        /// 是否目录
        /// </summary>
        [Display(Name = "是否目录")]
        [Required(ErrorMessage = "请选择目录")]
        public bool? IsDir { get; set; }



        /// <summary>
        /// 角色
        /// </summary>
        [Display(Name = "角色", Description = "")]
        [Required(ErrorMessage = "角色不能为空")]
        public List<FrameworkRoleView> Roles { get; set; }
        /// <summary>
        /// 动作
        /// </summary>
        public List<EidtFrameworkMenActionView> Actions { get; set; }

    }
    /// <summary>
    ///菜单动作
    /// </summary>
    public class EidtFrameworkMenActionView
    {
       
        /// <summary>
        /// 操作项
        /// </summary>
        public SumityTypeEnum SumityType { get; set; }

        // <summary>
        /// 主键Id
        /// </summary>
        //[Display(Name = "Id", Description = "Id")]
        //public int Id { get; set; } = 0;

        /// <summary>
        /// 菜单Id
        /// </summary>
        [Display(Name = "MenId", Description = "菜单Id")]
        public int MenId { get; set; } = 0;

        
        /// <summary>
        /// 菜单链接地址 路由
        /// </summary>
        [Display(Name = "菜单链接地址", Description = "")]

        public string LinkUrl { get; set; }

        /// <summary>
        /// 是否选中
        /// </summary>
        [Display(Name = "是否选中", Description = "")]

        public bool Selected { get; set; }


        /// <summary>
        /// 动作名称
        /// </summary>
        [Display(Name = "名称", Description = "")]

        public string ActionName { get; set; }

        // <summary>
        /// 父ID
        /// </summary>
        [Display(Name = "父ID", Description = "")]
        public int? ParentId { get; set; }

        



    }
}
